package org.andao.commons.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.andao.core.base.model.RootModel;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;



/**
 * 系统附件表. 
 * 
 * @author Marco.hu(hzg139@163.com)
 */

@Entity
@Table(name = "seewo_sys_attachs")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Attachs extends RootModel{

	
	private static final long serialVersionUID = 2225867624463776873L;
	
	/**附件存储方式 - ftp*/
	public static final String FILE_SAVETYPE_FTP = "ftp";
	
	/**附件存储方式 - 本地存储*/
	public static final String FILE_SAVETYPE_LOCAL = "local";
		
	@Column(name = "FORMID")
	private String formId;//表单ID
	
	@Column(name="FORMTYPE")
	private String formType;//表单类型
	
	@Column(name = "ATTNAME",nullable=false)
	private String attName;//附件名（原始名）
	
	@Column(name = "SERNAME",nullable=false)
	private String serName;//附件存储在服务器上的名称
	
	@Column(name = "ATTTYPE")
	private String attType;//附件类型
	
	@Column(name = "ATTSIZE")
	private Long attSize = 0L;//附件大小
	
	@Column(name="SERPATH")
	private String serPath;//服务器存储目录
	
	@Column(name="SAVETYPE")
	private String saveType = FILE_SAVETYPE_LOCAL;//保存方式，如local,ftp等
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="UPLOADTIME")
	private Date uploadTime = new Date();//上传时间
	
	@Column(name="CACHEWEBPATH")
	private String cacheWebPath;//缓存web服务器的路径
	
	@Column(name = "SHOWORDER")
	private Integer showOrder;//排序号
	
	@Column(name = "FILLINMAN")
	private String fillinName;//上传人
	
	@Column(name = "FILLINMANID")
	private String fillinNameId;//上传人ID
	
	@Column(name="targetPath")
	private String targetPath;//需要拷贝的目标路径
	
	
	
	public String getTargetPath() {
		return targetPath;
	}

	public void setTargetPath(String targetPath) {
		this.targetPath = targetPath;
	}

	public String getFormType() {
		return formType;
	}

	public void setFormType(String formType) {
		this.formType = formType;
	}

	public String getCacheWebPath() {
		return cacheWebPath;
	}

	public void setCacheWebPath(String cacheWebPath) {
		this.cacheWebPath = cacheWebPath;
	}

	public String getAttName() {
		return attName;
	}

	public void setAttName(String attName) {
		this.attName = attName;
	}
	

	public String getAttType() {
		return attType;
	}

	public void setAttType(String attType) {
		this.attType = attType;
	}

	public String getFillinName() {
		return fillinName;
	}

	public void setFillinName(String fillinName) {
		this.fillinName = fillinName;
	}

	public String getFillinNameId() {
		return fillinNameId;
	}

	public void setFillinNameId(String fillinNameId) {
		this.fillinNameId = fillinNameId;
	}

	public String getFormId() {
		return formId;
	}

	public void setFormId(String formId) {
		this.formId = formId;
	}

	public String getSaveType() {
		return saveType;
	}

	public void setSaveType(String saveType) {
		this.saveType = saveType;
	}

	public String getSerName() {
		return serName;
	}

	public void setSerName(String serName) {
		this.serName = serName;
	}

	public String getSerPath() {
		return serPath;
	}

	public void setSerPath(String serPath) {
		this.serPath = serPath;
	}

	

	public Long getAttSize() {
		return attSize;
	}

	public void setAttSize(Long attSize) {
		this.attSize = attSize;
	}

	public Integer getShowOrder() {
		return showOrder;
	}

	public void setShowOrder(Integer showOrder) {
		this.showOrder = showOrder;
	}

	public Date getUploadTime() {
		return uploadTime;
	}

	public void setUploadTime(Date uploadTime) {
		this.uploadTime = uploadTime;
	}
	
	
	

}
